package dao

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Mobile string `gorm:"type:char(11);not null;comment:手机号"`
}

type User2 struct {
	gorm.Model
	Name string `gorm:"type:varchar(20);not null;comment:名称"`
	Pass string `gorm:"type:varchar(40);not null;comment:密码"`
}

type Update struct {
	gorm.Model
	UserId  int    `gorm:"type:int(20);not null;comment:用户id"`
	Title   string `gorm:"type:varchar(255);not null;comment:标题"`
	Content string `gorm:"type:varchar(255);not null;comment:内容"`
	Images  string `gorm:"type:varchar(255);not null;comment:图片"`
	Videos  string `gorm:"type:varchar(255);not null;comment:视频"`
	LCount  string `gorm:"type:varchar(255);not null;comment:点赞量"`
	CCount  string `gorm:"type:varchar(255);not null;comment:评论量"`
}

type Follow struct {
	gorm.Model
	UserId   int `gorm:"type:int(20);not null;comment:用户id"`
	FollowId int `gorm:"type:int(20);not null;comment:被关注id"`
}

type Likes struct {
	gorm.Model
	UserId int    `gorm:"type:int(20);not null;comment:用户id"`
	LikeId int    `gorm:"type:int(20);not null;comment:被点赞id"`
	Types  string `gorm:"type:varchar(20);not null;comment:类型"`
}

type Comment struct {
	gorm.Model
	UserId    int    `gorm:"type:int(20);not null;comment:用户id"`
	CommentId int    `gorm:"type:int(20);not null;comment:被评论id"`
	Types     string `gorm:"type:varchar(20);not null;comment:类型"`
	Content   string `gorm:"type:varchar(255);not null;comment:评论内容"`
}

type Group struct {
	gorm.Model
	GroupId  int `gorm:"type:int(20);not null;comment:群id"`
	UserId1  int `gorm:"type:int(20);not null;comment:用户1id"`
	UserId2  int `gorm:"type:int(20);not null;comment:用户2id"`
	LeaderId int `gorm:"type:int(20);not null;comment:群主id"`
}

type Pull struct {
	gorm.Model
	GroupId  int    `gorm:"type:int(20);not null;comment:群id"`
	PullId   int    `gorm:"type:int(20);not null;comment:拉人id"`
	PeopleId int    `gorm:"type:int(20);not null;comment:被拉人id"`
	Types    string `gorm:"type:varchar(20);not null;comment:拉人类型"`
}

type Member struct {
	gorm.Model
	UserId   int    `gorm:"type:int(20);not null;comment:用户id"`
	Position string `gorm:"type:varchar(20);not null;comment:职位"`
}
